

DECLARE @TEMP TABLE
(
	ID INT IDENTITY(1,1),
	EMP_ID INT	
)
DECLARE @COUNT INT
SET @COUNT=(select count(*) from dbo.EMPLOYEES)
declare i int
set i=1
while(i<=@COUNT)
	BEGIN
		INSERT INTO @TEMP(EMP_ID,FULLNAME) SELECT EMP_ID,
	END


select EMP_ID,(EMP_FIRSTNAME +' '+ EMP_LASTNAME) AS FULLNAME
 from  employees 
WHERE 
(APP_STATUS='DENY' AND APP_DATE='2010-08-17' AND APP_STARTTIME='9')


UPDATE dbo.APPOINTMENTS SET APP_STARTTIME=NULL
		


	



SELECT*FROM APPOINTMENTS WHERE APP_DATE='2010-08-17'

UPDATE APPOINTMENTS SET APP_STARTTIME=0

